import 'package:flutter/material.dart';

import 'dafault_page.dart';
import 'index_navigator.dart';

class IndexNavigator extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      margin: EdgeInsets.only(top: 20, bottom: 20),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceAround,
        children: navigatorItems
            .map((e) => InkWell(
                  onTap: () {
                    e.onTap?.call(context);
                  },
                  child: Column(
                    children: [
                      Image.asset(
                        e.imageUrl!,
                        width: 60,
                      ),
                      Text(e.title!)
                    ],
                  ),
                ))
            .toList(),
      ),
    );
  }
}
